//
//  LGCache.m
//  UniverseProject
//
//  Created by king on 2021/6/25.
//  Copyright © 2021 Cloud2209. All rights reserved.
//

#import "LGCache.h"

@implementation LGCache
SingletonM(LGCache)


+ (void)saveStringRecord:(NSString *)record ByKey:(NSString *)key{
    EGOCache *cache = [EGOCache globalCache];
    [cache setString:record forKey:key];
}

+ (nullable NSString *)getStringRecordByKey:(NSString *)key{
    EGOCache *cache = [EGOCache globalCache];
    NSString*value = [cache stringForKey:key];
    return value;
}

+ (void)saveObject:(nonnull id<NSCoding>)obj ByKey:(NSString *)key{
    EGOCache *cache = [EGOCache globalCache];
    [cache setObject:obj forKey:key];
}

+ (nullable id<NSCoding>)getObjByKey:(NSString *)key{
    EGOCache *cache = [EGOCache globalCache];
    id obj = [cache objectForKey:key];
    return obj;
}



@end
